#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "base/CTFile.h"
#include "base/CTStringUtils.h"

using namespace CTLib;

int main(int argc, char *argv[])
{
    if (argc < 1)
    {
        return 0;
    }

    int iRet = 0;
    CTReadFile stReadFile;
    iRet = stReadFile.Open(argv[1]);
    if (iRet){return iRet;}

    char* szLine = stReadFile.ReadLine();
    while (szLine != NULL)
    {
        printf("|%s|%s|\n", szLine, CTStringUtils::UrlEncode(szLine));
        szLine = stReadFile.ReadLine();
    }

    return 0;
}

